<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</meta>
<title>F().midpoint演示</title>
<style type="text/css">
*{margin:0; padding:0;}
html,body{width:100%; height:100%;}
div{position:absolute; width:100px; height:100px;}
#box1{left:100px; top:100px; background-color:red;}
#box2{left:400px; top:400px; background-color:blue;}
</style>
<script type="text/javascript" src="../../1st.js"></script>
</head>
<body>
<div id="box1"></div>
<div id="box2"></div>

<script type="text/javascript">
var o1 = F("box1").midpoint(1);
var o2 = F("box2").midpoint(2);
F.canvas().ops("#ffffff","#000000",1).range(0,0,500,500).line(o1.x,o1.y,o2.x,o2.y);
</script>
</body>
</html>